package basic.arch.component.lock.distributed.zookeeper;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * CreateDate:2016年9月8日下午6:13:52 
 * @Description: 配置信息  
 * @author:jannal
 * @version V1.0
 */
@Component
public class ZkConfigInfo {

    /**
     * 服务器地址
     */
    @Value("${lock.zk.host}")
    private String host;
    
    /**
     * 会话超时时间
     */
    @Value("${lock.zk.sessionTimeOut}")
    private int sessionTimeoutMs;
    
    /**
     * 连接超时时间
     */
    @Value("${lock.zk.connectionTimeoutMs}")
    private int connectionTimeoutMs;
    
    /**
     * 重试间隔时间
     */
    @Value("${lock.zk.sleepMsBetweenRetries}")
    private int sleepMsBetweenRetries;
    
    /**
     * 重试次数
     */
    @Value("${lock.zk.retryNTimes}")
    private int retryNTimes;

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

  
    public int getSessionTimeoutMs() {
        return sessionTimeoutMs;
    }

    public void setSessionTimeoutMs(int sessionTimeoutMs) {
        this.sessionTimeoutMs = sessionTimeoutMs;
    }

    public int getConnectionTimeoutMs() {
        return connectionTimeoutMs;
    }

    public void setConnectionTimeoutMs(int connectionTimeoutMs) {
        this.connectionTimeoutMs = connectionTimeoutMs;
    }

    public int getSleepMsBetweenRetries() {
        return sleepMsBetweenRetries;
    }

    public void setSleepMsBetweenRetries(int sleepMsBetweenRetries) {
        this.sleepMsBetweenRetries = sleepMsBetweenRetries;
    }

    public int getRetryNTimes() {
        return retryNTimes;
    }

    public void setRetryNTimes(int retryNTimes) {
        this.retryNTimes = retryNTimes;
    }
    
}
  